import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';

class OiToast {
  static msg(String msg,
      {ToastGravity? gravity = ToastGravity.CENTER, Color? backgroundColor}) {
    Fluttertoast.showToast(
        msg: msg,
        gravity: gravity,
        backgroundColor: backgroundColor ?? Colors.cyan.shade400);
  }

  static error(String msg) {
    OiToast.msg(msg, backgroundColor: Colors.red);
  }

  static warning(String msg) {
    OiToast.msg(msg, backgroundColor: Colors.yellow.shade800);
  }
}
